﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameOfRobots
{
    public class Robot
    {
        public int X              { get; private set; }
        public int Y              { get; private set; }
        public ConsoleColor Color { get; private set; }
        
        private Random _randomColor = new Random();

        public Robot()
        {
            this.X     = 1;
            this.Y     = 1;
            this.Color = ConsoleColor.Yellow;
        }

        public void SetNextColor()
        {
            this.Color = (ConsoleColor)_randomColor.Next(0, 16); 
        }

        public void GoUp()
        {
            this.Y--;
        }

        public void GoDown()
        {
            this.Y++;
        }

        public void GoLeft()
        {
            this.X--;
        }

        public void GoRight()
        {
            this.X++;
        }
    }
}
